package com.yex.utils;

import org.apache.shiro.crypto.hash.SimpleHash;
import org.apache.shiro.util.ByteSource;

/**
 * @Author: 袁晓钧
 * @Date: Created in 2018/1/30 15:27
 * @Version: V1
 * @Description: 加密工具类
 */
public class PasswordHelper {

	private static String algorithmName = "md5";
	private static int hashIterations = 2;

	public static String encryString(String pwd, String salt) {
	    String newPassword = new SimpleHash(algorithmName,Utils.getMD5_32_xx(pwd+"hello, 51SZZC"), ByteSource.Util.bytes(salt), hashIterations).toHex();
	    return newPassword;
	}

}